package com.feib.stms.action;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;


import com.feib.stms.model.UploadFile;
import com.feib.stms.model.UploadFileActionLog;
import com.feib.stms.model.UploadFileTodoList;


/**
 * 交割款資料審查
 * @author Jeff Gu
 *
 */
public class Stms2002ActionBean extends BaseDoUploadFileActionbean {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 2828649536772340648L;


	/**
	 * 預設頁面,放行頁面直接顯示待放行資料
	 */
	private static final String DEFAULT_JSP = "/WEB-INF/views/stms2002/stms2002.jsp";
	
	
	public Stms2002ActionBean() {
		super();
		super.fileFormats = new ArrayList<String>();
		super.fileFormats.add(getUploadFileFormat());
		super.actions=getActions();
		super.todoListMenuItemPk=getTodoListMenuItemPk();
		super.deleteFileStatus=getDeleteStatus();
		super.fileStatus=getFileStatus();		
	}	
	
	
	
	@Override
	public List<String> getActions() {
		List<String> actions=new ArrayList<String>();		
		actions.add(UploadFileActionLog.UPLOAD_FILE_ACTION_LOG_CHECK);		
		return actions;
	}

	@Override
	protected String getDefaultPage() {
		return DEFAULT_JSP;
	}

	@Override
	public Integer getDeleteStatus() {
		/* 20: 已刪除/審查不通過(只要有一人審查不通過，即為審查不通過；明細應註記為刪除) */
		return 20;
	
	}

	@Override
	public String getDownloadFileName() {
		return "交割明細表_"+yyyyMMddHHmmSS.format(Calendar.getInstance().getTime())+".xls";
	}

	@Override
	public List<Integer> getFileStatus() {
		List<Integer> fileStatus=new ArrayList<Integer>();
		fileStatus.add(0);//0: 已上傳/待驗資/待審查(已轉入，尚未有任何人審查)
		fileStatus.add(10);//10: 審查中(已有人員審查，但未達到審查人數門檻)	
		return fileStatus;
}

	@Override
	public Long getTodoListMenuItemPk() {
		return UploadFileTodoList.TODO_CONFIRM_DELIVERY_PAYMENT;
	}

	@Override
	public String getUploadFileFormat() {
		return UploadFile.UPLOAD_FILE_DELIVERY_PAYMENT;
	}

	

}
